{{Strip}}
{{$pjax := Form "_pjax"}}
{{if $pjax}}
	{{if eq $pjax "#main-container"}}
		{{Block "head"}}{{/Block}}
		{{Block "bodyNav"}}{{/Block}}
		<div class="container-fluid" id="pcont">
			{{if hasAnyBlock "name" "breadcrumb"}}
			<div class="page-head">
				<h2>{{Block "name"}}{{/Block}}</h2>
				<ol class="breadcrumb">
				  {{Block "breadcrumb"}}
				  <li><a href="/manage">Home</a></li>
				  {{/Block}}
				</ol>
			</div>
			{{end}}
		    <div class="cl-mcont">{{Block "main"}}{{/Block}}</div>
		</div><!-- #pcont -->
		{{Block "footer"}}{{/Block}}
	{{else}}
		{{Block "main"}}{{/Block}}
	{{end}}
{{else}}
<!DOCTYPE html>
<html lang="{{Lang}}">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="{{"Nging管理面板登录"|T}}">
	<meta name="author" content="admpub">
	<link rel="shortcut icon" href="__ASSETS__/images/favicon.png">
	<title>{{Block "title"}}Start{{/Block}} - Nging v{{Version}}</title>
	<link href="__ASSETS__/css/reset.css" rel="stylesheet" />
	<link href='__ASSETS__/css/font_OpenSans400_300_600_400italic_700_800.css' rel='stylesheet' type='text/css' />
	<link href='__ASSETS__/css/font_Raleway_300_200_100.css' rel='stylesheet' type='text/css' />
	<!-- Bootstrap core CSS -->
	<link rel="stylesheet" href="__ASSETS__/js/bootstrap/dist/css/bootstrap.css" />
	<link rel="stylesheet" href="__ASSETS__/js/jquery.gritter/css/jquery.gritter.css" />
	<link rel="stylesheet" href="__ASSETS__/fonts/font-awesome-4/css/font-awesome.min.css" />
    <link rel="stylesheet" href="__ASSETS__/js/jquery.nanoscroller/nanoscroller.css" />
    <link rel="stylesheet" href="__ASSETS__/js/bootstrap.switch/bootstrap-switch.css" />
    <link href="__ASSETS__/js/jquery.icheck/skins/square/blue.css" rel="stylesheet" />
	<link rel="stylesheet" href="__ASSETS__/js/jquery.niftymodals/css/component.css">
    {{Block "head"}}{{/Block}}
	<!-- Custom styles for this template -->
	<link href="__ASSETS__/css/style.css" rel="stylesheet" />
</head>
 
<body{{Block "bodyAttr"}}{{/Block}}>
    {{Include "header"}}
	<div id="cl-wrapper">
		{{Include "sidebar"}}
		<div class="cl-body">
		<div id="main-container">
		{{Block "bodyNav"}}{{/Block}}
		<div class="container-fluid" id="pcont">
			{{if hasAnyBlock "name" "breadcrumb"}}
			<div class="page-head">
				<h2>{{Block "name"}}{{/Block}}</h2>
				<ol class="breadcrumb">
				  {{Block "breadcrumb"}}
				  <li><a href="/manage">Home</a></li>
				  <!-- <li class="active">Current</li> -->
				  {{/Block}}
				</ol>
			</div>
			{{end}}
		    <div class="cl-mcont">{{Block "main"}}{{/Block}}</div>
		</div><!-- #pcont -->
		</div><!-- #main-container -->
		</div><!-- .cl-right -->
	</div><!-- #cl-wrapper -->

<script src="__ASSETS__/js/jquery.js"></script>

<script src="__ASSETS__/js/modernizr.js" type="text/javascript"></script>
<script type="text/javascript" src="__ASSETS__/js/jquery.nanoscroller/jquery.nanoscroller.js"></script>
<script type="text/javascript" src="__ASSETS__/js/bootstrap.switch/bootstrap-switch.min.js"></script>
<!--<script type="text/javascript" src="__ASSETS__/js/jquery.nestable/jquery.nestable.js"></script>-->
<script type="text/javascript" src="__ASSETS__/js/jquery.icheck/icheck.min.js"></script>
<script type="text/javascript" src="__ASSETS__/js/jquery.pjax.js"></script>
<script type="text/javascript" src="__ASSETS__/js/jquery.niftymodals/js/jquery.modalEffects.js"></script>

<script type="text/javascript" src="__ASSETS__/js/behaviour/general.js"></script>
<script type="text/javascript" src="__ASSETS__/js/jquery.gritter/js/jquery.gritter.js"></script>
<script type="text/javascript" src="__ASSETS__/js/behaviour/voice-commands.js"></script>
<script type="text/javascript" src="__ASSETS__/js/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__ASSETS__/js/storeWithJson2.min.js"></script>

<script>
$(function(){
	App.init();
	App.markNavByURL({{if Stored.Get "activeURL"}}'{{Stored.Get "activeURL"}}'{{else}}null{{end}});
	App.attachPjax(null,{
		 onclick: function(obj){
			 App.unmarkNav();
			 App.markNav($(obj));
		 },
		 onend: function(evt,xhr,opt){
			 opt.container.find('[data-popover="popover"]').popover();
			 opt.container.find('.ttip, [data-toggle="tooltip"]').tooltip();
		 }
	});
	App.attachAjaxURL();
{{if .}}
	{{if IsError .}}
	App.message({title: '{{"系统消息"|T}}', text: "{{.}}", class_name: "danger"});
	{{else if IsOk .}}
	App.message({title: '{{"系统消息"|T}}', text: "{{.}}", class_name: "success"});
	{{end}}
{{end}}
	var messageCount=0,messageMax=20;
	App.websocket(function(message){
		var c=$('#notice-message-container');
		if(c.length<1){
			App.message({title: '{{"系统消息"|T}}', text: '<ul id="notice-message-container" class="no-list-style" style="max-height:500px;overflow-y:auto;overflow-x:hidden"></ul>'});
			c=$('#notice-message-container');
		}
		if(messageCount>=messageMax){
			c.find('li:first').remove();
		}
		var m=$.parseJSON(message);
		if(m.title){
			var badge='badge-danger';
			if(m.status==1){
				badge='badge-success';
			}
			message='<span class="badge '+badge+'">'+App.text2html(m.title)+'</span>'+App.text2html(m.content);
		}else{
			message=App.text2html(m.content);
		}
		c.append('<li>'+message+'</li>');
		messageCount++;
	},'/manage/notice');
});
</script>
{{Block "footer"}}{{/Block}}
<div id="loading-status"><i class="fa fa-spinner fa-spin fa-3x"></i></div>
</body>
</html>
{{end}}
{{/Strip}}